#include "Bullet.h"


Bullet::Bullet()
{
	x = y = w = h = 0;

	dead = false;
}


Bullet::~Bullet()
{

}

bool Bullet::init(char *file)
{
	if((surface = Surface::load_image(file)) == NULL)
	{
		printf("error! :: Can't load image %s\n", file);
		return false;
	}

	w = surface->w;
	h = surface->h;

	return true;
}

void Bullet::move()
{
	y -= 10.0f * FPS::FPSControl.GetSpeedFactor();
}

void Bullet::render(SDL_Surface *destination)
{
	Surface::apply_surface(surface, destination, x, y);
}

